package com.szrt.javaweb.ch01.dyn.spring;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException;


@Service
public class ActorService {
	
	
	@Resource
	private ActorDao  dao ;
	
	
	
	@Transactional(readOnly=false, propagation=Propagation.NEVER,  rollbackFor=MySQLSyntaxErrorException.class)
	public int insert(ActorEntity entity) throws Exception{
		
		return dao.insert(entity);
		
	}

}
